<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <!--[if lte IE 9]> 
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript" src="web_socket.js"></script>
        <script>
            // Let the library know where WebSocketMain.swf is:
            WEB_SOCKET_SWF_LOCATION = "WebSocketMain.swf";
        </script>
    <![endif]-->
    <script>
        var ws = new WebSocket("ws://192.168.31.116:7700");

        ws.onopen = function(e) {

        }

        ws.onclose = function(e) {

        }

        ws.onerror = function(e) {
        }

        ws.onmessage = function(e) {
            console.log('------------------------------------');
            console.log(e.data);
            console.log('------------------------------------');
        }
    </script>
</body>
</html>